home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / utility / freedos.zip / COM050.ZIP / TESTENV.C < prev    next >
Text File  |  1996-01-17  |  501b  |  24 lines

  1. int main (int argc, char *argv[], char *env[])
  2. {
  3.    int count;
  4.  
  5.    puts ("Commandline:");
  6.  
  7.    for (count = 0; count < argc; count++)
  8.       printf ("%d: %s\n", count, argv[count]);
  9.  
  10.    puts ("\nEnvironment:");
  11.  
  12.    for (count = 0; env[count]; count++)
  13.       printf ("%d: %s\n", count, env[count]);
  14.  
  15.    putenv ("PATH=");
  16.  
  17.    puts ("\nEnvironment after a setenv (\"PATH=\");:");
  18.  
  19.    for (count = 0; env[count]; count++)
  20.       printf ("%d: %s\n", count, env[count]);
  21.  
  22.    return 0;
  23. }
  24.